<template>
  <e-button type="primary" @click="start">开始</e-button>
  <e-button type="primary" @click="finish">结束</e-button>
  <e-button type="primary" @click="error">错误</e-button>
  <loadingBar class="markdown-body"></loadingBar>
</template>

<script setup>
import {getCurrentInstance} from "vue"

import loadingBar from "../../docs/loading-bar.md"

const context=getCurrentInstance().appContext.config.globalProperties

const start= ()=> {
  context.$Loading.start();
};
const finish= ()=> {
  context.$Loading.finish();
};
const error= ()=> {
  context.$Loading.error();
}
</script>
